/**
 * 
 */
package rs.fon.rapidminer.operator.learner.tree;

import java.util.Date;
import java.util.List;

import com.rapidminer.example.ExampleSet;

import rs.fon.rapidminer.process.annotation.Parameter;

/**
 * @author Nikola
 * 
 */
public class TreeDepthStoppingCriteria extends AbstractStopingCriteria {

	@Parameter(defaultValue = "5", maxValue = "100", minValue = "1")
	private Double Tree_Depth;

	
	
	@Override
	public Object DoWork(ExampleSet exampleSet, int depth, Date startDate, List<rs.fon.rapidminer.process.Parameter> parameters)
	{
		return depth <= Integer.parseInt(parameters.get(0).getXenteredValue());
	}	

}
